package com.yuhs.zixing.study.design.pattern.dp002.structural.s003.decorator.d003;

/**
 * @description:
 * @author: yuhs
 * @date: 2022/5/1 9:37 PM
 */
public abstract class Decorator extends Component {
    private Component component = null;

    //通过构造函数传递被修饰者
    public Decorator(Component _component) {
        this.component = _component;
    }

    //委托给被修饰者执行
    @Override
    public void operate() {
        this.component.operate();
    }
}
